import Vue from 'vue'
import VueRouter from 'vue-router'
import No from '../views/no.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/home',
        name: 'Home',
        component: () =>
            import ('../views/home.vue')
    },
    {
        path: '/order',
        name: 'Order',

        component: () =>
            import ('../views/order.vue')
    },
    {
        path: '/user',
        name: 'User',

        component: () =>
            import ('../views/user.vue')
    },
    {
        path: '/list',
        name: 'List',
        component: () =>
            import ('../views/list.vue')
    }, {
        path: "/",
        redirect: "/home"
    }, {
        path: "*",
        name: "No",
        component: No
    }

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router